package fr.channel.server;

import java.io.Serializable;

import fr.channel.shared.dto.Reponse;

public class ReponseFactory {

	
	public static <T extends Serializable> Reponse<T> getSucessReponse(T value) {
		Reponse<T> reponse = new Reponse<T>();
		reponse.setValue(value);
		reponse.setSucess(true);
		return reponse;
	}
	
	public static <T extends Serializable> Reponse<T> getErrorReponse(String erreur) {
		Reponse<T> reponse = new Reponse<T>();
		reponse.setError(erreur);
		reponse.setSucess(false);
		return reponse;
	}
}
